package Wix::Tag::Product;

use parent qw/Wix::Tag/;

our $DEFAULT_LANGUAGE = '1033';
our $DEFAULT_MANUFACTURER = 'Thomson Reuters';

sub new() {
	my ($class, $args) = @_;
	
	my $self = Wix::Tag->new({TAG => 'Product'});
	
	$self->addAttr('Id', '*');
	$self->addGUID('UpgradeCode');
	$self->addAttr('Name', $args->{NAME});
	$self->addAttr('Version', $args->{VERSION});
	$self->addAttr('Language', $args->{LANGUAGE} || $DEFAULT_LANGUAGE);
	$self->addAttr('Manufacturer', $args->{MANUFACTURER} || $DEFAULT_MANUFACTURER);
	
	return bless($self, $class);
}

sub addPackage($) {
	my ($self, $package) = @_;

	$self->addElement('Wix::Tag::Package', $package);	
}

sub addMedia($) {
	my ($self, $media) = @_;

	$self->addElement('Wix::Tag::Media', $media);	
}

sub addComponent($) {
	my ($self, $component) = @_;

	$self->addElement('Wix::Tag::Component', $component);	
}

sub addComponentGroup($) {
	my ($self, $componentgroup) = @_;

	$self->addElement('Wix::Tag::ComponentGroup', $componentgroup);	
}

sub addDirectory($) {
	my ($self, $directory) = @_;

	$self->addElement('Wix::Tag::Directory', $directory);	
}

sub addDirectoryRef($) {
	my ($self, $directoryref) = @_;

	$self->addElement('Wix::Tag::DirectoryRef', $directoryref);	
}

sub addFeature($) {
	my ($self, $feature) = @_;

	$self->addElement('Wix::Tag::Feature', $feature);	
}

sub addCustomAction($) {
	my ($self, $customaction) = @_;

	$self->addElement('Wix::Tag::CustomAction', $customaction);	
}

sub addProperty($) {
	my ($self, $property) = @_;

	$self->addElement('Wix::Tag::Property', $property);	
}

sub addInstallExecuteSequence($) {
	my ($self, $ies) = @_;
	
	$self->addElement('Wix::Tag::InstallExecuteSequence', $ies);
}

sub addUIRef($) {
	my ($self, $uiref) = @_;
	
	$self->addElement('Wix::Tag::UIRef', $uiref);
}

1;